new Vue({
    el: '#app',
    data() {
        return {
            activeName: 'first',
            loading:false,
            form: {
                Company_Business_Personnel_SerialNumber: "",
                Company_Business_Personnel_Name: '',
                Company_Business_Personnel_Position: "",
                Company_Business_Personnel_Phone: "",
            },
        }
    },
    methods: {
        back() {
            window.history.go(-1)
        },
        handleClick(tab, event) {
            console.log(tab, event);
        },
        subMessage() {
            const _this = this
            this.loading = true
            $.ajax({
                url: DomainName + '/GoodsFileAdd',
                type: 'POST',
                data: {
                    Data: JSON.stringify({
                        company_business_personnel: [_this.form]
                    }),
                    token: $.cookie("token")
                },
                success: function (res) {
                    console.log('提交结果', res)
                    if (res.Status == 'success') {
                        _this.$message.success("成功!")
                        window.history.go(-1)
                    }
                },
                error: function () {
                    _this.$message.error("操作失败，请稍后再试")
                },
                complete: function (XMLHttpRequest) {
                    _this.loading = false
                    if (XMLHttpRequest.getResponseHeader("REDIRECT") == "REDIRECT") {
                        window.parent.document.location.href = "../../../" + XMLHttpRequest.getResponseHeader("CONTENTPATH");
                    }
                }
            })
        }
    },
})